#pragma once
#include <iostream>
#include <ctime>

#define LOG(level_str, format, ...){\
    time_t t = time(nullptr);\
    struct tm* ptm = localtime(&t);\
    char time_str[32] = {0};\
    strftime(time_str, 31, "[%H:%M:%S]", ptm);\
    printf("[%s][%s][%s:%d] " format "\n", level_str, time_str, __FILE__, __LINE__, ##__VA_ARGS__);\
}
#define DLOG(format, ...) LOG("DEG", format, ##__VA_ARGS__)
#define ILOG(format, ...) LOG("INF", format, ##__VA_ARGS__)
#define ELOG(format, ...) LOG("ERR", format, ##__VA_ARGS__)
#define WLOG(format, ...) LOG("WAR", format, ##__VA_ARGS__)